package bairui.international.model.type;

/**
 *
 * (用户金额类型)Type_UserScore
 */
@com.lianjing.sh.processing.info.annotation.GenerateInfoModel
@com.lianjing.sh.model.common.annotation.Comment("用户金额类型")
@com.lianjing.sh.processing.info.annotation.InfoComment("用户金额类型")
public enum Type_UserScore implements com.sh_lianjing.standard.EnumCommentable<Type_UserScore> {

	/**
	 * (订单提成)Royalty</br>
	 */
	@com.lianjing.sh.model.common.annotation.Comment("订单提成")
	@com.lianjing.sh.processing.info.annotation.InfoComment("订单提成")
	Royalty("订单提成")
,
	/**
	 * (订单抵扣)Deduct</br>
	 */
	@com.lianjing.sh.model.common.annotation.Comment("订单抵扣")
	@com.lianjing.sh.processing.info.annotation.InfoComment("订单抵扣")
	Deduct("订单抵扣")
;

	private static java.util.Map<String, Type_UserScore> Cache = new java.util.HashMap<>();
	static{
		for(Type_UserScore enumItem : Type_UserScore.values()){
			Cache.put(enumItem.getComment(), enumItem);
		}
	}

	private String comment;

	private Type_UserScore(String comment){
		this.comment = comment;
	}

	@Override
	public String toString() {
		return comment;
	}

	@Override
	public String getComment() {
		return comment;
	}

	@Override
	public Type_UserScore parseByComment(String comment) {
		return Type_UserScore.parse(comment);
	}

	public static Type_UserScore parse(String comment) {
		Type_UserScore enumItem = Cache.get(comment);
		if(null == enumItem){
			 throw new com.sh_lianjing.standard.exception.EnumCommentableException(Type_UserScore.class, comment);
		}
		return enumItem;
	}

}
